package cc.plumgo.ss.core;

public class Constants {
	public static final int OPT_MAX_SOUND = 6;
	public static final int OPT_MAX_VOLUME = 6;
	
	public static final String UI_IMG_POST = "/image/ui_welcome.png";
	public static final String UI_IMG_MENU = "/image/ui_menu.png";
	public static final String UI_IMG_ARROW = "/image/ui_arrow.png";
	public static final String UI_IMG_ABOUT = "/image/ui_about.png";
	public static final String UI_IMG_HELP = "/image/ui_help.png";
	public static final String UI_IMG_OPT = "/image/ui_setting.png";
	public static final String UI_IMG_VOL = "/image/ui_volmue.png";
	public static final String UI_IMG_START = "/image/ui_start.png";
	public static final String UI_IMG_FLW = "/image/ui_flower.png";
	public static final String UI_IMG_PASS = "/image/ui_pass.png";
	public static final String UI_IMG_OVER_BACK = "/image/ui_over_back.png";
	public static final String UI_IMG_OVER_TEXT = "/image/ui_over_text.png";
	public static final String UI_IMG_MENU_BACK = "/image/ui_menu_back.png";
	public static final String UI_IMG_MENU_BTN = "/image/ui_menu_btn.png";
	
	public static final String UI_TXT_POST = "按确定键继续...";
	public static final String UI_TXT_OPT_SND = "音效";
	public static final String UI_TXT_OPT_VOL = "音量";
	public static final String UI_TXT_SRT_NEW = "新的游戏";
	public static final String UI_TXT_SRT_GOON = "继续游戏";
	
	public static final int [] UI_MENU_FRM_SIZ = {240, 319};
	public static final int [] UI_POST_FRM_SIZ = {240, 300};
	public static final int [] UI_ARROW_FRM_SIZ = {25, 22};
	public static final int [] UI_VOL_SIZ = {41, 44};
	public static final int [] UI_FLW_SIZ = {135, 51};
	public static final int [] UI_MENU_BTN = {110, 30};
	public static final int UI_PASS_HEIGHT = 140;
	
	// man moving parameters
	public static final int MAN_WALK_SPEED = 5;
	public static final int MAN_JUMP_HEIGHT = 35;
	public static final int MAN_JUMP_Y_SPEED = 10;
	public static final int MAN_JUMP_X_SPEED = 8;
	public static final int MAN_CROUCH_HEIGHT = 20;
	public static final int MAN_CROUCH_SPEED = 10;
	public static final int MAN_JUMP_AWAY_DIS = 50;
	public static final int MAN_JUMP_AWAY_SPEED = 20;
	public static final int MAN_JUMP_AWAY_Y = 5;
	public static final int MAN_JUMP_AWAY_HARM = 20;
	public static final int MAN_BLOOD = 200;
	public static final int MAN_ATTACKED_AWAY_DIS = 20;

	// man sprite resources
	public static final String[] MAN_SPRITE_IMGS = { 
		"/image/man_stop.png",
		"/image/man_walk.png", 
		"/image/man_attack.png",
		"/image/man_attacked.png", 
		"/image/man_die.png",
		"/image/man_jump.png", 
		"/image/man_crouch.png" 
	};

	public static final int[] MAN_SPRITE_W = { 
		89, 89, 89, 89, 89, 89, 89 
	};
	public static final int[] MAN_SPRITE_H = { 
		101, 101, 103, 101, 98, 101, 98 
	};

	// bullet parameters
	public static final int BULLET_SPEED = 15;
	public static final int BULLET_OFFSET_X = 15;
	public static final int BULLET_OFFSET_Y = 0;
	public static final int[] BULLET_DISTANS = { 
		45, 65, 85, 105 
	};
	public static final int[] BULLET_HARMS = { 
		10, 20, 30, 40 
	};

	// bullet sprite resources
	public static final String[] BULLET_SPRITE_IMGS = {
		"/image/bullet_none.png", 
		"/image/bullet_baseb.png",
		"/image/bullet_footb.png", 
		"/image/bullet_basketb.png" 
	};
	public static final int[] BULLET_SPRITE_W = { 
		11, 11, 19, 23 
	};
	public static final int[] BULLET_SPRITE_H = { 
		11, 11, 19, 25 
	};

	public static final String[] ITEM_SPRITE_IMGS = {
		"/image/bullet_baseb.png",
		"/image/bullet_footb.png",
		"/image/bullet_basketb.png",
		"/image/item_glass.png",
		"/image/item_cream.png"
	};
	public static final int [] ITEM_SPRITE_W = {
		11, 19, 23, 45, 26 
	};
	public static final int [] ITEM_SPRITE_H = {
		11, 19, 25, 9, 45
	};
	
	public static final int [] ITEM_PICK_OFFSET = {
		20, 25, 30, 25, 45
	};
	
	public static final int [] ITEM_SHOW_H = {
		265, 260, 255, 265, 235
	};
	
	// state bar
	public static final String MAN_STATE_IMG = "/image/state_default.png";
	public static final String MAN_BLOOD_IMG = "/image/state_blood.png";

	// enemy
	public static final String[][] ENM_SPRITE_IMGS = {
		{ 
			"/image/enm_flybook_walk.png", 
			"/image/enm_flybook_attack.png",
			"/image/enm_flybook_attacked.png",
			"/image/enm_flybook_die.png" 
		},
		{ 
			"/image/enm_pen_walk.png", 
			"/image/enm_pen_attack.png",
			"/image/enm_pen_attacked.png", 
			"/image/enm_pen_die.png" 
		},
		{ 
			"/image/enm_eraser_walk.png", 
			"/image/enm_eraser_attack.png",
			"/image/enm_eraser_attacked.png",
			"/image/enm_eraser_die.png" 
		},
		{ 
			"/image/enm_broom_walk.png", 
			"/image/enm_broom_attack.png",
			"/image/enm_broom_attacked.png",
			"/image/enm_broom_die.png" 
		},
		{ 
			"/image/enm_bottle_walk.png", 
			"/image/enm_bottle_walk.png",
			"/image/enm_bottle_walk.png",
			"/image/enm_bottle_die.png" 
		},
		{ 
			"/image/enm_barrel_walk.png", 
			"/image/enm_barrel_attack.png",
			"/image/enm_barrel_walk.png", 
			"/image/enm_barrel_die.png" 
		},
		{ 
			"/image/enm_peninpen_walk.png", 
			"/image/enm_peninpen_attack.png",
			"/image/enm_peninpen_attacked.png",
			"/image/enm_peninpen_die.png" 
		},
		{ 
			"/image/enm_dustpan_attack.png", 
			"/image/enm_dustpan_attack.png",
			"/image/enm_dustpan_attacked.png",
			"/image/enm_dustpan_die.png" 
		},
		{ 
			"/image/enm_boss_walk.png", 
			"/image/enm_boss_attack.png",
			"/image/enm_boss_attacked.png", 
			"/image/enm_boss_die.png"
		}
	};

	public static final int[][] ENM_SPRITE_W = { 
		{ 85, 115, 85, 85 },
		{ 58, 58, 58, 58 }, 
		{ 74, 60, 62, 60 }, 
		{ 33, 56, 60, 56 },
		{ 48, 48, 48, 105 },
		{ 104, 119, 104, 88 }, 
		{ 85, 148, 90, 85 }, 
		{ 110, 110, 99, 98 },
		{ 139, 139, 141, 163 } 
	};
	
	public static final int[][] ENM_SPRITE_H = { 
		{ 94, 115, 94, 94 },
		{ 100, 100, 100, 100 },
		{ 91, 85, 82, 85 },
		{ 155, 155, 155, 155 },
		{ 101, 101, 101, 101 }, 
		{ 76, 76, 76, 77 },
		{ 131, 133, 135, 131 },
		{ 111, 111, 135, 111 },
		{ 122, 121, 123, 145 } 
	};
	public static final int ENM_WALK_RANGE_X = 100;
	public static final int ENM_WALK_RANGE_Y = 20;
	public static final int [] ENM_WALK_SPEED = {
		6, 6, 6, 6, 0, 6, 6, 6, 6
	};
	
	public static final int[] ENM_ATTACK_DIS = { 
		60, 50, 90, 60, 60, 60, 60, 60, 60 
	};
	
	public static final int[] ENM_ATTACK_HARM = { 
		10, 20, 30, 40, 50, 60, 70, 80, 90 
	};
	
	public static final int[] ENM_BLOOD = {
		30, 50, 70, 90, 110, 130, 250, 270, 290
	};
	
	public static final int ENM_DELAY_TIME = 10;
	public static final int [] ENM_ATTACK_FREQ = {
		40, 30, 50, 40, 20, 40, 20, 20, 20
	};
	
	public static final int [] ENM_INIT_POSY = {
		160, 180, 190, 130, 180, 200, 150, 165, 160
	};
	
	public static final int ENM_ATTACKED_AWAY_SPEED = 5;
	public static final int ENM_ATTACKED_DELAY = 5;
	
	public static final int [] ENM_ATTACK_MOVE_SPEED = {
		0, 0, 3, 0, 0, 0, 0, 0, 0
	};
	public static final int [] ENM_SPRITE_DIR = {
		1, 0, 0, 0, 0, 1, 0, 1, 1
	};
	// scene
	public static final String[] SCENE_IMGS = { 
		"/image/scene_aisle.png",
		"/image/scene_basement.png", 
		"/image/scene_yard.png", 
	};
	public static final int [] SCENE_SIZ = {2160, 320};
	// enemy in scene
	public static final int[][] SCENE_ENM_POS = {
		{ 280, 550, 700, 800, 1050, 1200, 1380, 1650, 1854, 2050 },
		{ 280, 550, 700, 800, 1050, 1200, 1380, 1650, 1854, 2050 },
		{ 160, 250, 390, 480, 580, 667, 803, 919, 1037, 1175, 1285, 
			1400, 1505, 1630, 1750, 1850, 2023 } 
	};
	public static final int[][] SCENE_ENM_TYPE = {
		{ 0, 0, 1, 0, 2, 0, 1, 2, 1, 6 }, 
		{ 3, 3, 4, 3, 5, 3, 4, 5, 4, 7 },
		{ 0, 2, 1, 0, 3, 0, 1, 2, 3, 6, 5, 7, 5, 3, 6, 7, 8 } 
	};
	
	public static final int [][] ENM_ITEMS = {
		{-1, 0, -1, 1, -1, -1, 4, -1, 2, -1},
		{-1, 0, -1, 1, 0, 2, -1, -1, 3, -1},
		{0, 1, 2, 2, 1, 1, 2, -1, 4, 0, 1, 2, 2, 1, 3, 2, -1}
	};

	// logic
	public static final int LOGIC_FINDING_DIS = 150;
	public static final int LOGIC_COLLISION_DIS = 30;
	public static final int LOGIC_OUTPUT_DIS = 230;
}
